Optimal. Leaf size=146 \[ \frac {2 (A-B) c^2 \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {(A-B) c \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a+a \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 146, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3052, 2819,
2816, 2746, 31} \begin {gather*} \frac {2 c^2 (A-B) \cos (e+f x) \log (\sin (e+f x)+1)}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}+\frac {c (A-B) \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a \sin (e+f x)+a}}-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a \sin (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rule 2819
Rule 3052
Rubi steps
\begin {align*} \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^{3/2}}{\sqrt {a+a \sin (e+f x)}} \, dx &=-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a+a \sin (e+f x)}}+(A-B) \int \frac {(c-c \sin (e+f x))^{3/2}}{\sqrt {a+a \sin (e+f x)}} \, dx\\ &=\frac {(A-B) c \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a+a \sin (e+f x)}}+(2 (A-B) c) \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx\\ &=\frac {(A-B) c \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a+a \sin (e+f x)}}+\frac {\left (2 a (A-B) c^2 \cos (e+f x)\right ) \int \frac {\cos (e+f x)}{a+a \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {(A-B) c \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a+a \sin (e+f x)}}+\frac {\left (2 (A-B) c^2 \cos (e+f x)\right ) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,a \sin (e+f x)\right )}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {2 (A-B) c^2 \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {(A-B) c \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 f \sqrt {a+a \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.47, size = 146, normalized size = 1.00 \begin {gather*} -\frac {c \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (-1+\sin (e+f x)) \sqrt {c-c \sin (e+f x)} \left (B \cos (2 (e+f x))-4 \left (4 (-A+B) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+(A-2 B) \sin (e+f x)\right )\right )}{4 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^3 \sqrt {a (1+\sin (e+f x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(506\) vs.
\(2(132)=264\).
time = 0.33, size = 507, normalized size = 3.47
method | result | size |
default | \(\frac {\left (-B \left (\cos ^{3}\left (f x +e \right )\right )+B \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right )+2 A \left (\cos ^{2}\left (f x +e \right )\right )+2 A \sin \left (f x +e \right ) \cos \left (f x +e \right )+4 A \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-8 A \cos \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-4 A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )+8 A \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-3 B \left (\cos ^{2}\left (f x +e \right )\right )-4 B \sin \left (f x +e \right ) \cos \left (f x +e \right )-4 B \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+8 B \cos \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+4 B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )-8 B \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-2 A \sin \left (f x +e \right )-4 A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+8 A \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+B \cos \left (f x +e \right )+3 B \sin \left (f x +e \right )+4 B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-8 B \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-2 A +3 B \right ) \left (-c \left (\sin \left (f x +e \right )-1\right )\right )^{\frac {3}{2}}}{2 f \left (\cos ^{2}\left (f x +e \right )-\cos \left (f x +e \right ) \sin \left (f x +e \right )+\cos \left (f x +e \right )+2 \sin \left (f x +e \right )-2\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}\) | \(507\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{\frac {3}{2}} \left (A + B \sin {\left (e + f x \right )}\right )}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 260, normalized size = 1.78 \begin {gather*} -\frac {\sqrt {2} \sqrt {c} {\left (\frac {\sqrt {2} {\left (A \sqrt {a} c \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - B \sqrt {a} c \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {\sqrt {2} B a^{\frac {3}{2}} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - \sqrt {2} A a^{\frac {3}{2}} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + \sqrt {2} B a^{\frac {3}{2}} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}{a^{2}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{3/2}}{\sqrt {a+a\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________